/*配置proxy，解决跨域问题*/

let proxyObj = {}

proxyObj['/'] = {
    //webSock，为false
    ws:false,
    //代理的地址
    target: 'http://localhost:8081',
    //发送请求头host会被设置为target
    changeOrigin: true,
    //不重写请求地址
    pathRewrite: {
        '^/':'/'
    }
}

module.exports = {
    devServer: {
        host: 'localhost',
        port: 3000,
        open: true,
        proxy: proxyObj
    }
}
